import requests
from baseTools.tool_logger import *

class MyApi():
    def myrequest(self, method, url, **kwargs):
        try:
            logger.info('调用接口')
            self.response = requests.request(method=method, url=url, **kwargs)
            return self.response
        except Exception as e:
            logger.error('调用接口错误，报错信息：{}'.format(e))
